#ifndef __MY_TASKS_H__
#define __MY_TASKS_H__

#include "main.h"
#include "rtx.h"

// 周期任务结构体
struct mt_Task_stu {
    struct rtx_Topic_subscriber_stu subscriber;
    struct rtx_Topic_stu topic;
    struct rtx_Timer_stu timer;

    void *pData;
};


struct reaction_tester_stu {
    TickType_t triger_ms;

    TickType_t click_ms;
    UsType_t click_us;

    uint8_t flag_last_pin_state;
};

extern struct reaction_tester_stu tester;

extern struct rtx_Topic_stu topic_tester;
extern struct rtx_Topic_subscriber_stu subscriber_tester;
extern struct rtx_Alarm_stu alarm_tester;

extern struct mt_Task_stu task_heart_beat;
extern struct mt_Task_stu task_blink;


int mt_Task_add(struct mt_Task_stu *task);

int myTask_init(void);


#endif // __MY_TASKS_H__
